package com.jt.www.domain.dto;

import com.jt.www.domain.enums.wxb.PerformancePolicyStatusEnum;
import com.jt.www.domain.enums.wxb.PerformanceSendStatusEnum;
import com.jt.www.domain.po.InsidePerformance;
import com.jt.www.util.DateUtils;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

/**
 * 线下录入导出
 * Created by shaoyn on 2020/05/22.
 */
public class InsidePerformanceOutputDTO {

    @ApiModelProperty(value = "推广人名称")
    private String managerName;

    @ApiModelProperty(value = "推广人账号")
    private String managerAccount;

    @ApiModelProperty(value = "推广人所在分支机构名称")
    private String branchName;

    @ApiModelProperty(value = "保单号")
    private String policyNo;

    @ApiModelProperty(value = "产品编码")
    private String productCode;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "出单时间")
    private String issureDate;

    @ApiModelProperty(value = "投保人名称")
    private String holderName;

    @ApiModelProperty(value = "投保人电话")
    private String holderPhone;

    @ApiModelProperty(value = "保单状态   1-已出单，2-已退保")
    private String policyStatus;

    @ApiModelProperty(value = "保险起期时间")
    private String startTime;

    @ApiModelProperty(value = "保险止期时间")
    private String endTime;

    @ApiModelProperty(value = "保费")
    private BigDecimal premium;

    @ApiModelProperty(value = "业绩")
    private BigDecimal performance;

    @ApiModelProperty(value = "标记发放状态 1-已发放，2-未发放")
    private String sendStatus;

    @ApiModelProperty(value = "标记发放时间")
    private String sendTime;

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    public InsidePerformanceOutputDTO(InsidePerformance insidePerformance) {
        this.managerName = insidePerformance.getManagerName();
        this.managerAccount = insidePerformance.getManagerAccount();
        this.branchName = insidePerformance.getBranchName();
        this.policyNo = insidePerformance.getPolicyNo();
        this.productCode = insidePerformance.getProductCode();
        this.productName = insidePerformance.getProductName();
        if (null != insidePerformance.getIssureDate()) {
            this.issureDate = DateUtils.converDate(insidePerformance.getIssureDate());
        }
        this.holderName = insidePerformance.getHolderName();
        this.holderPhone = insidePerformance.getHolderPhone();
        this.policyStatus = PerformancePolicyStatusEnum.getDestByStatus(insidePerformance.getPolicyStatus());
        if (null != insidePerformance.getStartTime()) {
            this.startTime = DateUtils.converDate(insidePerformance.getStartTime());
        }
        if (null != insidePerformance.getEndTime()) {
            this.endTime = DateUtils.converDate(insidePerformance.getEndTime());
        }
        this.premium = insidePerformance.getPremium();
        this.performance = insidePerformance.getPerformance();
        this.sendStatus = PerformanceSendStatusEnum.getDestByStatus(insidePerformance.getSendStatus());
        if (null != insidePerformance.getSendTime()) {
            this.sendTime = DateUtils.converDate(insidePerformance.getSendTime());
        }
        if (null != insidePerformance.getCreateTime()) {
            this.createTime = DateUtils.converDate(insidePerformance.getCreateTime());
        }

    }


    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    public String getManagerAccount() {
        return managerAccount;
    }

    public void setManagerAccount(String managerAccount) {
        this.managerAccount = managerAccount;
    }

    public String getBranchName() {
        return branchName;
    }

    public void setBranchName(String branchName) {
        this.branchName = branchName;
    }

    public String getPolicyNo() {
        return policyNo;
    }

    public void setPolicyNo(String policyNo) {
        this.policyNo = policyNo;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getIssureDate() {
        return issureDate;
    }

    public void setIssureDate(String issureDate) {
        this.issureDate = issureDate;
    }

    public String getHolderName() {
        return holderName;
    }

    public void setHolderName(String holderName) {
        this.holderName = holderName;
    }

    public String getHolderPhone() {
        return holderPhone;
    }

    public void setHolderPhone(String holderPhone) {
        this.holderPhone = holderPhone;
    }

    public String getPolicyStatus() {
        return policyStatus;
    }

    public void setPolicyStatus(String policyStatus) {
        this.policyStatus = policyStatus;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public BigDecimal getPremium() {
        return premium;
    }

    public void setPremium(BigDecimal premium) {
        this.premium = premium;
    }

    public BigDecimal getPerformance() {
        return performance;
    }

    public void setPerformance(BigDecimal performance) {
        this.performance = performance;
    }

    public String getSendStatus() {
        return sendStatus;
    }

    public void setSendStatus(String sendStatus) {
        this.sendStatus = sendStatus;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}
